import {createApp} from "vue";
import App from "@/App.vue";
// 全局引入样式
import "@/style/reset.less";
// 如果想element-plus的组件生效，必须引入全局引入element-plus样式
import "element-plus/dist/index.css";
// 引入阿里巴巴图标库
import "/src/assets/iconfont/iconfont.css"
import "element-plus/theme-chalk/display.css";

// 引入定义的路由
import router from "@/router/index";
// 引入对外暴露的pinia实例
import pinia from "@/store/index";
// 引入element-plus
import ElementPlus from "element-plus";
// 引入element-plus的图标库
import * as ElementPlusIconsVue from "@element-plus/icons-vue";

const app = createApp(App);

// 注册插件
app.use(router);
app.use(pinia);
app.use(ElementPlus);

// 此处参考官网，意为将图标库中的每个图标都注册成组件
for (const [key, component] of Object.entries(ElementPlusIconsVue)) {
    app.component(key, component);
}

app.mount("#app");
